from distutils.core import setup
import py2exe
import shutil
import os

try:
  os.mkdir(dstdir + "tmp" )
  shutil.rmtree("build")
except:
  pass
try:
  os.mkdir("build")
except:
  pass

setup(
     windows = [{"script":"wphoniax.pyw",
     "icon_ressources":[(0,"icon.ico")]}
     ],
     version = "0.2.1",
     name = "Wphoniax",
     description = "Wphoniax",
     )

dstdir = "dist"+os.sep
for file in [ "wphoniax.ini", "libiaxclient.dll", "wphoniax.iss", "icon.ico", "wphoniax.png" ] :
  shutil.copyfile(file, dstdir+file)

try:
  os.mkdir(dstdir + "tmp" )
  shutil.rmtree("build")
except:
  pass
